from page.city_page import CityPage
from handle.city_handle import CityHandle
from time import sleep

class CityBusicess():
    def __init__(self, driver):
        self.city_p = CityPage(driver)
        self.city_h = CityHandle(driver)

    # 添加城市
    def add_city(self, name, desc):
        self.city_h.click_add_buttom()
        sleep(3)
        self.city_h.send_city_name(name)
        self.city_h.send_desc(desc)
        self.city_h.click_save_buttom()
        sleep(3)
        text = self.city_p.get_ok_tishi_element().text
        return text
